﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace CVSS.Client.SC.UI
{
    public partial class UITime : UserControl
    {
        public UITime()
        {
            InitializeComponent();
        }

        public DateTime datetime
        {
            get { return Convert.ToDateTime(Convert.ToDateTime(this.DTPDate.Text).
                AddHours(Convert.ToDouble(this.Hour.Value)).
                AddMinutes(Convert.ToDouble(this.Minute.Value))); }
        }

        public decimal hour
        {
            get { return Hour.Value; }
            set { Hour.Value = value; }
        }

        public decimal minute
        {
            get { return Minute.Value; }
            set { Minute.Value = value; }
        }

        public void Reset()
        {
            this.DTPDate.Text = DateTime.Now.ToString();
            this.Hour.Value = hour;
            this.Minute.Value = minute;
        }
    }
}
